
from conn_mysql.api_mysql import ApiMysql

from flask import Flask, request, Blueprint, render_template

from . import app_login

app = Flask(__name__)

@app_login.route('/login', methods=['GET', 'POST'])

def login():

    methods = request.method

    info = request.form

    phone = info.get('user')

    pass_word = info.get('pass_word')

    with ApiMysql() as conn_api:

        conn_info = conn_api.login_user(methods, phone, pass_word)

    return conn_info

    